﻿
Namespace Seguranca.Dominio

    ''' <summary>
    ''' Classe de Recursos de Seguranca
    ''' </summary>
    ''' <remarks></remarks>
    <Serializable()> _
    Public Class Recurso

        Private _id As Long

        ''' <summary>
        ''' Identificador da Seguranca
        ''' </summary>
        ''' <value>Long</value>
        ''' <returns>Long</returns>
        ''' <remarks></remarks>
        Public Overridable Property Id() As Long
            Get
                Return _id
            End Get
            Set(ByVal value As Long)
                _id = value
            End Set
        End Property

        Private _nome As String

        ''' <summary>
        ''' Nome do Recurso
        ''' </summary>
        ''' <value>String</value>
        ''' <returns>String</returns>
        ''' <remarks></remarks>
        Public Overridable Property Nome() As String
            Get
                Return _nome
            End Get
            Set(ByVal value As String)
                _nome = value
            End Set
        End Property

        Private _modulo As Short

        ''' <summary>
        ''' Modulo do Recurso
        ''' </summary>
        ''' <value>Short</value>
        ''' <returns>Short</returns>
        ''' <remarks></remarks>
        Public Overridable Property Modulo() As Short
            Get
                Return _modulo
            End Get
            Set(ByVal value As Short)
                _modulo = value
            End Set
        End Property

        Private _url As String

        ''' <summary>
        ''' URL do recurso
        ''' </summary>
        ''' <value>String</value>
        ''' <returns>String</returns>
        ''' <remarks></remarks>
        Public Overridable Property Url() As String
            Get
                Return _url
            End Get
            Set(ByVal value As String)
                _url = value
            End Set
        End Property

        Private _DominioSigaDois As Boolean

        ''' <summary>
        ''' Dominio SigaDois
        ''' </summary>
        ''' <value>Boolean</value>
        ''' <returns>Boolean</returns>
        ''' <remarks></remarks>
        Public Overridable Property DominioSigaDois() As Boolean
            Get
                Return _DominioSigaDois
            End Get
            Set(ByVal value As Boolean)
                _DominioSigaDois = value
            End Set
        End Property

        Private _tipo As TipoRecurso

        ''' <summary>
        ''' Propriedade _tipo
        ''' </summary>
        ''' <value>TipoRecurso(classe TipoRecurso)</value>
        ''' <returns>TipoRecurso(classe TipoRecurso)</returns>
        ''' <remarks></remarks>
        Public Overridable Property Tipo() As TipoRecurso
            Get
                Return _tipo
            End Get
            Set(ByVal value As TipoRecurso)
                _tipo = value
            End Set
        End Property

        Private _papeis As IList(Of Papel)

        ''' <summary>
        ''' Propriedade _papeis
        ''' </summary>
        ''' <value>Lista(classe Papel)</value>
        ''' <returns>Lista(classe Papel)</returns>
        ''' <remarks></remarks>
        Public Overridable Property Papeis() As IList(Of Papel)
            Get
                If _papeis Is Nothing Then
                    _papeis = New List(Of Papel)
                End If
                Return _papeis
            End Get
            Set(ByVal value As IList(Of Papel))
                _papeis = value
            End Set
        End Property

        Private _papeisComRestricao As IList(Of Papel)

        ''' <summary>
        ''' Propriedade _papeisComRestricao
        ''' </summary>
        ''' <value>Lista(classe Papel)</value>
        ''' <returns>Lista(classe Papel)</returns>
        ''' <remarks></remarks>
        Public Overridable Property PapeisComRestricao() As IList(Of Papel)
            Get
                If _papeisComRestricao Is Nothing Then
                    _papeisComRestricao = New List(Of Papel)
                End If
                Return _papeisComRestricao
            End Get
            Set(ByVal value As IList(Of Papel))
                _papeisComRestricao = value
            End Set
        End Property

    End Class
End Namespace